﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Customer_Info.aspx.cs" Inherits="JKF.Web.Customer.Customer_Info" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <%= RegScript("~/js/jquery.1.5.js")%>
    <%=RegScript("~/js/Common.js")%>
    <%=RegScript("~/js/jquery.json.js")%>
    <%=RegScript("~/js/jquery.nhis.js")%>
    <%=RegScript("~/js/jquery.rchis.js")%>
    <%=RegScript("~/js/jquery.validate.js")%>
    <%=RegScript("~/js/DatePicker/WdatePicker.js")%>
    <%=RegStyle("~/js/suggest/jquery.suggest.css")%>
    <%=this.RegStyle("~/App_Themes/Theme2/Include.css")%>
    <script type="text/javascript">
        var tmpl = new DTemplate();
        var customerInfo = <%=CustomerInfo%>;
        var memoryDay=customerInfo!=null?customerInfo.MemoryDay:null;
        var disease = (customerInfo == undefined || customerInfo == null) ? null : customerInfo.Disease;
        $(function () {
            if(customerInfo) BindData();
        });

        function BindData() {
            var ob = customerInfo.Customer;
            $("#CARD_NO").text($.FxNull(ob.CARD_NO, ""));
            $("#LEVEL_NAME").text($.FxNull(ob.LEVEL_NAME, ""));
            $("#NAME").text($.FxNull(ob.NAME, ""));
            $("#MOBILE").text($.FxNull(ob.MOBILE, ""));
            $("#ID_CARD").text($.FxNull(ob.ID_CARD, ""));
            $("#SEX").text($.FxNull(ob.SEX, ""));
            $("#BIRTHDAY").text($.FxNull(ob.BIRTHDAY, ""));
            $("#Phone").text($.FxNull(ob.PHONE, ""));
            $("#REFEREE_CARD").text($.FxNull(ob.REFEREE_CARD, ""));
            $("#REFEREE").text($.FxNull(ob.REFEREE, ""));
            $("#ADDRESS").text($.FxNull(ob.ADDRESS, ""));
            $("#POSTAL_CODE").text($.FxNull(ob.POSTAL_CODE, ""));
            $("#EMAIL").text($.FxNull(ob.EMAIL, ""));
            //$("#IS_LUNAR_CALENDAR").attr("checked", $.FxNull(ob.IS_LUNAR_CALENDAR, "") == "1");
            //$("#DISEASE").text($.FxNull(ob.DISEASE, ""));
            if(disease && disease.length>0) {
                var disNames = [];
                $(disease).each(function() {disNames.push(this.Name);});
                $("#DISEASE").text(disNames.join("，"));
            }
            $("#AREA").text($.FxNull(ob.AREA,""));
            $("#GIVE_POINTS").text($.FxNull(ob.GIVE_POINTS, ""));
            $("#CONSUME_POINTS").text($.FxNull(ob.CONSUME_POINTS, ""));
            $("#GROUP_NAME").text($.FxNull(ob.GROUP_NAME, ""));
            $("#PWD").text($.FxNull(ob.PWD, ""));
            $("#MEMO").text($.FxNull(ob.MEMO, ""));
            $("#TITLE").text($.FxNull(ob.TITLE, ""));
            $("#FAMILY").text($.FxNull(ob.FAMILY, ""));

            var t = tmpl("<tr ky=\"${ID}\" nm=\"${NAME}\" dt=\"${MEMORIALDAY_DATE}\"><td>${NAME}</td><td>${MEMORIALDAY_DATE}</td><td><a href=\"javascript:\" pk=\"${ID}\" onclick=\"delMem(this);\">删除</a></td></tr>", memoryDay);
            if (memoryDay && memoryDay.length > 0) $("#memTable>tbody").empty();
            $("#memTable>tbody").append($(t));
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="pop_logging_body">
            <table width="100%" class="common_table_noborde">
                 <tr>
                    <td width="18%" align="center" colspan="2" rowspan="4">
                        <img  id="PERSON_PHOTO" alt="" width="200px" src="<%=Photo_Url%>" style="height: 115px;overflow-y:hidden" />
                    </td>
                    <td width="18%" align="right">
                        <span class="f12red">*</span>顾客卡号：
                    </td>
                   <td id="CARD_NO"></td>
                </tr>
                 <tr>
                    <td width="18%" align="right">
                        <span class="f12red">*</span>顾客级别：
                    </td>
                   <td id="LEVEL_NAME"></td>
                </tr>
                 <tr>
                    <td width="18%" align="right">
                         <span class="f12red">*</span>姓名：
                    </td>
                     <td id="NAME"></td>
                </tr>
                 <tr>
                    <td width="18%" align="right">
                         <span class="f12red">*</span>手机号码：
                    </td>
                    <td id="MOBILE"></td>
                </tr>
               
                <tr>
                    <td width="18%" align="right">身份证：
                    </td>
                    <td id="ID_CARD"></td>
                    <td width="18%" align="right">性别：
                    </td>
                    <td id="SEX"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">生日：
                    </td>
                    <td id="BIRTHDAY"></td>
                    <td width="18%" align="right">固定电话：
                    </td>
                    <td id="PHONE"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">职业：
                    </td>
                    <td id="TITLE"></td>
                    <td width="18%" align="right">家庭情况：
                    </td>
                    <td id="FAMILY"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">推荐人卡号：
                    </td>
                    <td id="REFEREE_CARD"></td>
                    <td width="18%" align="right">推荐人姓名：
                    </td>
                    <td id="REFEREE"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">所在省：
                    </td>
                    <td colspan="3" id="AREA"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">地址：
                    </td>
                    <td colspan="3" id="ADDRESS"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">邮编：
                    </td>
                    <td id="POSTAL_CODE"></td>
                    <td width="18%" align="right">电子邮件：
                    </td>
                    <td id="EMAIL"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">赠送积分：
                    </td>
                    <td id="GIVE_POINTS"></td>
                    <td width="18%" align="right">消费积分：
                    </td>
                    <td id="CONSUME_POINTS"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">顾客分组
                    </td>
                    <td id="GROUP_NAME"></td>
                    <td width="18%" align="right">顾客密码：
                    </td>
                    <td id="PWD"></td>
                </tr>
                <tr>
                    <td width="18%" align="right">备注：
                    </td>
                    <td colspan="3" id="MEMO"></td>
                </tr>
                <tr>
                    <td width="18%" align="right" valign="top">纪念日：
                    </td>
                    <td colspan="3">
                        <table id="memTable" class="common_table" style="width: 400px;">
                            <thead>
                                <tr>
                                    <th>纪念日名称
                                    </th>
                                    <th>纪念日时间
                                    </th>
                                    <th>操作
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td colspan="3">没有数据</td>
                                </tr>
                            </tbody>
                        </table>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right">顾客病史：
                    </td>
                    <td colspan="3" id="DISEASE"></td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
